package com.ys.fmms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ys.fmms.mapper.NodeResourceListMapper;
import com.ys.fmms.pojo.NodeResourceList;
import com.ys.fmms.service.NodeResourceListService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service(value = "nodeResourceListServiceImpl")
public class NodeResourceListServiceImpl extends ServiceImpl<NodeResourceListMapper, NodeResourceList> implements NodeResourceListService {
    @Override
    public List<NodeResourceList> getNodeResourceList(String id) {
        QueryWrapper<NodeResourceList> wrapper = new QueryWrapper<>();
        wrapper.orderByAsc("id");
        wrapper.eq("mac",id);
        List<NodeResourceList> nodeResourceLists = baseMapper.selectList(wrapper);
        return nodeResourceLists;
    }
}
